<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .col-95 {
                width: 95%;
            }

            .col-5 {
                width: 5%;
            }
        </style>
        <script language="JavaScript" type="text/JavaScript">
            //<![CDATA[
            function KeyDown() {
                if (event.keyCode == 13) {
                    event.keyCode = 9;
                }
            }

            //]]>
        </script>
    </ui:define>
    <ui:define name="content">
        <div style="margin:5px">
            <p:tabView id="tabview" dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
                <p:tab title="跨行维修资金转出">
                    <h:form>
                        <div id="qrytable">
                            <p:messages id="msgs" showDetail="false"/>
                            <p:focus for="msgsn"/>
                            <p:panel style="margin-top:10px">
                                <h:panelGrid columns="2" cellspacing="5" columnClasses="col-95,col-5">
                                    <h:panelGrid columns="2" cellspacing="5">
                                        <h:outputLabel value="申请单编号:" style="font-weight: bold"/>
                                        <p:inputText required="true" size="25" style="margin-left:25px"
                                                     requiredMessage="申请单编号不能为空。"
                                                     id="msgsn" onkeydown="KeyDown()"
                                                     value="#{transferAction.msgSn}"/>
                                        <h:outputLabel value="交易金额:" style="font-weight: bold"/>
                                        <p:inputText id="amt" size="25" style="margin-left:25px"
                                                     autocomplete="false" required="true"
                                                     value="#{transferAction.txnAmt}"
                                                     requiredMessage="交易金额不能为空。"
                                                     validatorMessage="请输入正确的金额格式。">
                                            <f:convertNumber for="amt" maxFractionDigits="2" maxIntegerDigits="13"
                                                             pattern="###,###,###,###,##0.00"/>
                                        </p:inputText>
                                    </h:panelGrid>
                                    <h:panelGrid id="buttons">
                                        <p:commandButton style="width:110px;" value="查询转出信息"
                                                         disabled="#{transferAction.checkPassed}"
                                                         rendered="#{!transferAction.confirmed}"
                                                         action="#{transferAction.onQueryOut}"
                                                         update="pdt,msgs,buttons,panel2">
                                        </p:commandButton>
                                        <p:commandButton style="width:110px;" value="确认转出"
                                                         rendered="#{transferAction.checkPassed}"
                                                         disabled="#{transferAction.confirmed}"
                                                         action="#{transferAction.onConfirmTransOut}"
                                                         update="pdt,msgs,buttons">
                                        </p:commandButton>
                                    </h:panelGrid>
                                </h:panelGrid>
                            </p:panel>
                            <p:ajaxStatus style="height:18px;text-align:center">
                                <f:facet name="start">
                                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                                </f:facet>
                                <f:facet name="complete">
                                    <h:outputText value=""/>
                                </f:facet>
                            </p:ajaxStatus>
                            <p:dataTable id="pdt" dynamic="true" style="width:100%;"
                                         value="#{transferAction.subMsgList}" var="record"
                                         rowKey="#{record.pkid}"
                                         selection="#{transferAction.selectedRecords}"
                                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} 【总笔数:#{transferAction.totalCount}】"
                                         paginator="true" rows="15" paginatorPosition="bottom"
                                         rowsPerPageTemplate="100,50,30,15,5"
                                         emptyMessage="数据记录为空...">
                                <p:column selectionMode="multiple" style="width:18px"/>

                                <p:column headerText="资金帐号" style="text-align: center">
                                    <h:outputText value="#{record.fundActno1}"/>
                                </p:column>
                                <p:column headerText="帐户类型" style="text-align: center">
                                    <h:outputText
                                            value="#{actInfoAction.fundActType.valueOfAlias(record.fundActtype1).title}"/>
                                </p:column>
                                <p:column headerText="账户余额" style="text-align: right">
                                    <h:outputText value="#{record.actBal}"/>
                                </p:column>
                                <p:column headerText="分户数" style="text-align: center">
                                    <h:outputText value="#{record.cellNum}"/>
                                </p:column>
                                <p:column headerText="建筑面积" style="text-align: center">
                                    <h:outputText value="#{record.builderArea}"/>
                                </p:column>
                                <p:column headerText="住宅地址" style="text-align: center">
                                    <h:outputText value="#{record.infoAddr}"/>
                                </p:column>
                                <p:column headerText="住宅类型" style="text-align: center">
                                    <h:outputText value="#{record.houseDepType}"/>
                                </p:column>
                                <p:column headerText="工程造价|缴存比例" style="text-align: center">
                                    <h:outputText value="#{record.depStandard2}"/>
                                </p:column>
                                <p:column headerText="电话" style="text-align: center">
                                    <h:outputText value="#{record.houseCustPhone}"/>
                                </p:column>
                            </p:dataTable>
                            <p:separator style="margin-top:25px"/>
                            <p:panel id="panel2" style="margin-top:10px">
                                <h:panelGrid columns="1" cellspacing="5" columnClasses="col-95,col-5">
                                    <h:panelGrid columns="4" cellspacing="5">
                                        <h:outputLabel value="划出方项目ID:" style="font-weight: normal;"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.infoId1}"/>
                                        <h:outputLabel value="划出方项目类型:"
                                                       style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     style="margin-left: 25px;"
                                                     value="#{transferAction.summaryMsg.infoIdType1}"/>
                                        <h:outputLabel value="划入方项目ID:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.infoId2}"/>
                                        <h:outputLabel value="划入方项目类型:"
                                                       style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     style="margin-left: 25px;"
                                                     value="#{transferAction.summaryMsg.infoIdType2}"/>
                                        <h:outputLabel value="划出方归属区县:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.districtId}"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="4" cellspacing="5">
                                        <h:outputLabel value="划出方核算帐号:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.fundActno1}"/>
                                        <h:outputLabel value="划出方核算帐号类型:"
                                                       style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.fundActtype1}"/>
                                        <h:outputLabel value="划入方核算帐号:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.fundActno2}"/>
                                        <h:outputLabel value="划入方核算帐号类型:"
                                                       style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.fundActtype2}"/>
                                        <h:outputLabel value="划出方账户余额:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.actBal}"/>
                                        <h:outputLabel value="划出方会计帐号:"
                                                       style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.payoutActno}"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="4" cellspacing="5">
                                        <h:outputLabel value="划入方会计帐号:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.payinActno}"/>
                                        <h:outputLabel value="划入方开户银行:"
                                                       style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     style="margin-left: 25px;"
                                                     value="#{transferAction.summaryMsg.bankName}"/>
                                        <h:outputLabel value="划入方机构编号:" style="font-weight: normal"/>
                                        <p:inputText size="25" readonly="true"
                                                     value="#{transferAction.summaryMsg.branchId}"/>
                                        <h:outputLabel value="交易金额:" style="font-weight: normal; margin-left: 20px;"/>
                                        <p:inputText size="25" readonly="true"
                                                     style="margin-left: 25px;"
                                                     value="#{transferAction.summaryMsg.txnAmt1}"/>
                                    </h:panelGrid>

                                </h:panelGrid>
                            </p:panel>

                        </div>
                    </h:form>
                </p:tab>
            </p:tabView>
        </div>
    </ui:define>
</ui:composition>